package flc.ast.adapter;

import android.graphics.Color;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.provider.BaseItemProvider;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import flc.ast.R;
import stark.common.basic.adaptermutil.StkProviderMultiAdapter;
import stark.common.basic.adaptermutil.StkSingleSpanProvider;
import stark.common.basic.utils.SPUtil;

public class SayingKindAdapter extends StkProviderMultiAdapter<String> {

    public SayingKindAdapter() {
        addItemProvider(new StkSingleSpanProvider<>(55));
        addItemProvider(new SayingKindProvider());
    }

    private String levelName = "";//关卡名称，根据关卡名称获取对应关卡数

    public void setLevelName(String levelName) {
        this.levelName = levelName;
    }

    private class SayingKindProvider extends BaseItemProvider<String> {
        @Override
        public int getItemViewType() {
            return StkProviderMultiAdapter.TYPE_VIEW;
        }

        @Override
        public int getLayoutId() {
            return R.layout.item_saying_kind;
        }

        @Override
        public void convert(@NonNull BaseViewHolder baseViewHolder, String bean) {
            baseViewHolder.setText(R.id.tvSayingKindItemName, bean);
        }
    }
}
